<template>
	<div class="user_login" :style="{ height: evieHeight}">
		<div @click="jiJia" class="menuBox">
			<p class="iconImg">
				<img src="../../../static/img/opration/submitByNumber.png" alt="">
			</p>
			<p class="menuTitle">单个编号提交</p>
			<p class="rightArraw">
				<span class="iconfont iconright"></span>
			</p>
		</div>
		<div v-if="user_auth  == '2'">
			<div @click="user" class="menuBox">
				<p class="iconImg">
					<img src="../../../static/img/opration/submitByUser.png" alt="">
				</p>
				<p class="menuTitle">根据客户提交</p>
				<p class="rightArraw">
					<span class="iconfont iconright"></span>
				</p>

			</div>
			<div @click="all" class="menuBox">
				<p class="iconImg">
					<img src="../../../static/img/opration/submitByAll.png" alt="">
				</p>
				<p class="menuTitle">全矿场提交</p>
				<p class="rightArraw">
					<span class="iconfont iconright"></span>
				</p>
			</div>
		</div>
		<div class="tuiC" @click="tuiC">退出登录</div>
	</div>
</template>

<script>
import store from '../../store';
export default {
	data() {
		return {
			evieHeight: "",
			user_auth:"",
		};
	},
	components: {},
	mounted() {
		this.user_auth = wx.getStorageSync("user_auth");
		this.evieHeight = wx.getSystemInfoSync().windowHeight + "px";
	},
	methods: {
		user(){
			console.log("清空选择");
			store.commit("updateCheckNo",[]);
			store.commit("udpataJiJPageIndex",1);
			wx.navigateTo({
				url:'../../pages/AccordingUser/main'
			})
		},
		jiJia(){
			wx.navigateTo({
				url:'../../pages/jiJia/main'
			})
		},
		all(){
			wx.navigateTo({
				url:'../../pages/all/main'
			})
		},
		tuiC(){
			wx.showModal({
				title: '退出登录',
				content: '确定退出登录吗？',
				success: function(res) {
				if(res.confirm) {
					wx.removeStorage({
						key:"user_id",
						success:function(res){
							wx.reLaunch({
								url:"../default/main"
							});
						},
						fail(err){
							console.log("清空信息失败");
						}
					});
					}
				}
			});
		},
	},
	
	created() {},

};
</script>

<style scoped>
.user_login {
  width: 750rpx;
  position: relative;
  overflow: hidden;
  background-color: #F7F7F7;
}
.mage1{
  margin-top: 50rpx;
}
.mage{
  width: 745rpx;
  height: 180rpx;
}
.tuiC{
  width: 690rpx;
  height: 88rpx;
  margin-left: 30rpx;
  line-height: 88rpx;
  text-align: center;
  font-size: 32rpx;
  background-color: white;
  margin-top: 50rpx;
}
.menuBox{
	width:88%;
	display: flex;
	height: 135rpx;
	margin-left:8%;
	
	margin-top: 30rpx;
	border-radius: 6px;
	line-height: 135rpx;
	background-color: white;
	background-size: 50% 100%;
}
.iconImg{
	width: 10%;
	position: relative;
}
.iconImg img{
	left:-31px;
	top:15rpx;
	width: 157rpx;
	height: 151rpx;
	position: absolute;
}
.menuTitle{
	width: 80%;
	font-size: 32rpx;
	text-align: center;
}
.rightArraw{
	width: 10%;
}
</style>
